//
//  CYTempViewController.swift
//  CYSinaWB
//
//  Created by mac on 16/2/28.
//  Copyright © 2016年 mac. All rights reserved.
//

import UIKit

class CYTempViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.whiteColor()
        
        //一旦完成的了导航条的返回按钮的自定义 就需要自己添加点击事件
        //        let btn = UIButton(backImageName: nil, title: "返回", textColor: UIColor.darkGrayColor(), imageName: "navigationbar_back_withtext", fontSize: 14)
        //        btn.addTarget(self, action: "back", forControlEvents: .TouchUpInside)
        //        self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: btn)
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "push", style: .Plain, target: self, action: "push")
    }
    //    @objc private func back() {
    //        navigationController?.popViewControllerAnimated(true)
    //    }
    @objc private func push() {
        let temp = CYTempViewController()
        navigationController?.pushViewController(temp, animated: true)
    }
}
